home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
commercial
/
visual_inspirations
/
mlm
/
rexx
/
ppagelabels.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-17
|
3KB
|
106 lines
/*
PPageEnvelope.Rexx
Written By J.L. White
(C) 1993 Merlin's Software
For Use With Mailing List Manager & Professional Page
Print Envelopes From Database
*/
Font = "Times"
FontSize1 = 10
LabelsPerPage = 20
CR = '0a'x
arg Total
call SetUp
call ppm_PPageToFront()
call MakePages
call PickPrint
call ppm_New()
call ppm_PPageToBack()
exit
SetUp:
FileName = "RAM:MLM.Temp"
call ppm_New()
ppm_CreatePage(1,1,1,1,0)
ppm_DeleteBox(1)
call ppm_SetFont(Font)
call ppm_SetStyle(B)
call ppm_SetJustification(0)
call ppm_SetSize(FontSize1)
return
MakePages:
Position = ppm_Inform(2,"Indent Label Text?","NO","YES");
Numeric Digits 3
TempTotal = Total / LabelsPerPage
Numeric Digits 1
TotalPages = Total / LabelsPerPage
if TempTotal > TotalPages then TotalPages = TotalPages + 1
if Position = 0 then do
Box1 = ppm_CreateBox(0.3000,0.6200,3.8500,9.9850,0)
Box2 = ppm_CreateBox(4.3800,0.6200,3.8500,9.9850,0)
end
if Position = 1 then do
Box1 = ppm_CreateBox(0.9000,0.6200,3.2500,9.9850,0)
Box2 = ppm_CreateBox(4.9800,0.6200,3.2500,9.9850,0)
end
ppm_LinkBox(Box1,Box2)
ppm_SelectBox(Box1)
BoxA = Box2
do i = 2 to TotalPages
ppm_CopyPage(1,Total,1)
ppm_GotoPage(i)
BoxB = ppm_DocNextBox(BoxA)
ppm_LinkBox(BoxA,BoxB)
NewBox = ppm_DocNextBox(BoxB)
ppm_LinkBox(BoxB,NewBox)
BoxA = NewBox
end
ppm_GotoPage(1)
ppm_SelectBox(Box1)
ppm_ImportText(Box1,FileName)
return
PickPrint:
TypePrint=ppm_Inform(2,"Postscript Or Preference Printer","PREFERENCE PRINTER","POSTSCRIPT")
if TypePrint = 1 then call PostPrint
if TypePrint = 0 then call PrefPrint
return
PostPrint:
OutPut = ppm_Inform(3,"Select Type Of Output To Use?","DISK","SER:","PAR:");
if OutPut = 2 then TypeOutPut = "PAR:"
if OutPut = 1 then TypeOutPut = "SER:"
if OutPut = 0 then do
TypeOutPut = ppm_GetUserText(50,"Enter Name For Output File!")
if TypeOutPut = "" then call NoPrint
end
call ppm_SetPSOutput(TypeOutPut)
Manual = ppm_Inform(2,"Manual Feed ON-OFF?","OFF","ON")
call ppm_SetPSManFeed(Manual)
NumCopy = ppm_GetUserText(3,"Enter # Of Copies To Print!")
if NumCopy < 1 then call NoPrint
if NumCopy > 0 then ppm_PrintDocPS(NumCopy,1)
return
PrefPrint:
Eject=ppm_Inform(2,"Eject Page ON-OFF?","OFF","ON")
call ppm_SetDMEject(Eject)
NumCopy = ppm_GetUserText(3,"Enter # Of Copies To Print!")
if NumCopy < 1 then call NoPrint
call ppm_PrintDocDM(NumCopy,1)
return
NoPrint:
ppm_Inform(1,"Printing Has Been Cancelled!","OK")
call ppm_PPageToBack()
call ppm_New()
exit
return